export function throttle(func, delay = 200) {
  let timer = null
  return function (...arg) {
    // console.log(arg);
    if (timer) {
      return
    }
    timer = setTimeout(() => {
      func.apply(this, arg)
      clearTimeout(timer)
      timer = null
    }, delay)
  }
}
